/*
 * Copyright 2010 Chad Retz
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.jdocng.shared;

import java.io.Serializable;
import java.util.List;

import com.beust.jcommander.Parameter;
import com.google.common.annotations.GwtCompatible;

/**
 * Configuration POJO storing config values for javadoc
 * building. All legacy 
 * <a href="http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/tooldocs/windows/javadoc.html#options">Sun options</a>
 * are supported.
 * <p>
 * Not yet implemented
 *
 * @author Chad Retz
 */
@GwtCompatible(serializable = true)
@SuppressWarnings("serial")
public class Configuration implements Serializable {

    //legacy javadoc parameter fields
    
    @Parameter
    private List<String> parameters;

    @Parameter(names = "-overview")
    private String overview;
    
    @Parameter(names = "-public")
    private boolean publicArg;
    
    @Parameter(names = "-protected")
    private boolean protectedArg = true;
    
    @Parameter(names = "-package")
    private boolean packageArg;
    
    @Parameter(names = "-private")
    private boolean privateArg;

    @Parameter(names = "-help")
    private boolean help;
    
    @Deprecated
    @Parameter(names = "-help")
    private String doclet;
    
    @Deprecated
    @Parameter(names = "-docletpath")
    private String docletpath;
    
    @Deprecated
    @Parameter(names = "-1.1")
    private String oneDotOne;
    
    @Parameter(names = "-source")
    private String source;
    
    @Parameter(names = "-sourcepath")
    private String sourcepath;
    
    @Parameter(names = "-classpath")
    private String classpath;
    
    @Parameter(names = "-subpackages")
    private String subpackages;
    
    @Parameter(names = "-exclude")
    private String exclude;
    
    @Parameter(names = "-bootclasspath")
    private String bootclasspath;
    
    @Parameter(names = "-extdirs")
    private String extdirs;
    
    @Parameter(names = "-verbose")
    private boolean verbose;
    
    @Parameter(names = "-quiet")
    private boolean quiet;
    
    @Parameter(names = "-breakiterator")
    private boolean breakiterator;
    
    @Parameter(names = "-locale")
    private String locale;
    
    @Parameter(names = "-encoding")
    private String encoding;
    
    @Parameter(names = "-d")
    private String directory;
    
    @Parameter(names = "-use")
    private boolean use;
    
    @Parameter(names = "-version")
    private boolean version;
    
    @Parameter(names = "-author")
    private boolean author;
    
    @Parameter(names = "-splitindex")
    private boolean splitindex;
    
    @Parameter(names = "-windowtitle")
    private String windowtitle;
    
    @Parameter(names = "-doctitle")
    private String doctitle;
    
    @Deprecated
    @Parameter(names = "-title")
    private String title;
    
    @Parameter(names = "-header")
    private String header;
    
    @Parameter(names = "-footer")
    private String footer;
    
    @Parameter(names = "-bottom")
    private String bottom;
    
    @Parameter(names = "-link")
    private List<String> link;
    
    @Parameter(names = "-linkoffline", arity = 2)
    private List<String> linkoffline;
    
    @Parameter(names = "-linksource")
    private boolean linksource;
    
    @Parameter(names = "-group", arity = 2)
    private String group;
    
    @Parameter(names = "-nodeprecated")
    private boolean nodeprecated;
    
    @Parameter(names = "-nosince")
    private boolean nosince;
    
    @Parameter(names = "-notree")
    private boolean notree;
    
    @Parameter(names = "-noindex")
    private boolean noindex;
    
    @Parameter(names = "-nohelp")
    private boolean nohelp;
    
    @Parameter(names = "-nonavbar")
    private boolean nonavbar;
    
    @Parameter(names = "-helpfile")
    private String helpfile;
    
    @Parameter(names = "-stylesheetfile")
    private String stylesheetfile;
    
    @Deprecated
    @Parameter(names = "-serialwarn")
    private boolean serialwarn;
    
    @Parameter(names = "-charset")
    private String charset;
    
    @Parameter(names = "-docencoding")
    private String docencoding;
    
    @Parameter(names = "-tag")
    private List<String> tag;
    
    @Parameter(names = "-taglet")
    private String taglet;
    
    @Parameter(names = "-tagletpath")
    private String tagletpath;
    
    @Parameter(names = "-docfilessubdirs")
    private boolean docfilessubdirs;
    
    @Parameter(names = "-excludedocfilessubdir")
    private String excludedocfilessubdir;
    
    @Parameter(names = "-noqualifier")
    private String noqualifier;
    
    @Parameter(names = "-notimestamp")
    private boolean notimestamp;
    
    @Parameter(names = "-nocomment")
    private boolean nocomment;
    
    //javadoc-ng parameters
    
    @Parameter(names = "-parser")
    private String parser;
    
    @Parameter(names = "-outputter")
    private String outputter;
    
    @Parameter(names = "-logger")
    private String logger;

    //parameter accessors
    
    public List<String> getParameters() {
        return parameters;
    }

    public void setParameters(List<String> parameters) {
        this.parameters = parameters;
    }
    
    public String getOverview() {
        return overview;
    }
    
    public void setOverview(String overview) {
        this.overview = overview;
    }
    
    public boolean isPublicArg() {
        return publicArg;
    }

    public void setPublicArg(boolean publicArg) {
        this.publicArg = publicArg;
    }

    public boolean isProtectedArg() {
        return protectedArg;
    }

    public void setProtectedArg(boolean protectedArg) {
        this.protectedArg = protectedArg;
    }

    public boolean isPackageArg() {
        return packageArg;
    }

    public void setPackageArg(boolean packageArg) {
        this.packageArg = packageArg;
    }

    public boolean isPrivateArg() {
        return privateArg;
    }

    public void setPrivateArg(boolean privateArg) {
        this.privateArg = privateArg;
    }

    public boolean isHelp() {
        return help;
    }

    public void setHelp(boolean help) {
        this.help = help;
    }

    public String getDoclet() {
        return doclet;
    }

    public void setDoclet(String doclet) {
        this.doclet = doclet;
    }

    public String getDocletpath() {
        return docletpath;
    }

    public void setDocletpath(String docletpath) {
        this.docletpath = docletpath;
    }

    public String getOneDotOne() {
        return oneDotOne;
    }

    public void setOneDotOne(String oneDotOne) {
        this.oneDotOne = oneDotOne;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSourcepath() {
        return sourcepath;
    }

    public void setSourcepath(String sourcepath) {
        this.sourcepath = sourcepath;
    }

    public String getClasspath() {
        return classpath;
    }

    public void setClasspath(String classpath) {
        this.classpath = classpath;
    }

    public String getSubpackages() {
        return subpackages;
    }

    public void setSubpackages(String subpackages) {
        this.subpackages = subpackages;
    }

    public String getExclude() {
        return exclude;
    }

    public void setExclude(String exclude) {
        this.exclude = exclude;
    }

    public String getBootclasspath() {
        return bootclasspath;
    }

    public void setBootclasspath(String bootclasspath) {
        this.bootclasspath = bootclasspath;
    }

    public String getExtdirs() {
        return extdirs;
    }

    public void setExtdirs(String extdirs) {
        this.extdirs = extdirs;
    }

    public boolean isVerbose() {
        return verbose;
    }

    public void setVerbose(boolean verbose) {
        this.verbose = verbose;
    }

    public boolean isQuiet() {
        return quiet;
    }

    public void setQuiet(boolean quiet) {
        this.quiet = quiet;
    }

    public boolean isBreakiterator() {
        return breakiterator;
    }

    public void setBreakiterator(boolean breakiterator) {
        this.breakiterator = breakiterator;
    }

    public String getLocale() {
        return locale;
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getDirectory() {
        return directory;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        this.use = use;
    }

    public boolean isVersion() {
        return version;
    }

    public void setVersion(boolean version) {
        this.version = version;
    }

    public boolean isAuthor() {
        return author;
    }

    public void setAuthor(boolean author) {
        this.author = author;
    }

    public boolean isSplitindex() {
        return splitindex;
    }

    public void setSplitindex(boolean splitindex) {
        this.splitindex = splitindex;
    }

    public String getWindowtitle() {
        return windowtitle;
    }

    public void setWindowtitle(String windowtitle) {
        this.windowtitle = windowtitle;
    }

    public String getDoctitle() {
        return doctitle;
    }

    public void setDoctitle(String doctitle) {
        this.doctitle = doctitle;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getHeader() {
        return header;
    }

    public void setHeader(String header) {
        this.header = header;
    }

    public String getFooter() {
        return footer;
    }

    public void setFooter(String footer) {
        this.footer = footer;
    }

    public String getBottom() {
        return bottom;
    }

    public void setBottom(String bottom) {
        this.bottom = bottom;
    }

    public List<String> getLink() {
        return link;
    }

    public void setLink(List<String> link) {
        this.link = link;
    }

    public List<String> getLinkoffline() {
        return linkoffline;
    }

    public void setLinkoffline(List<String> linkoffline) {
        this.linkoffline = linkoffline;
    }

    public boolean isLinksource() {
        return linksource;
    }

    public void setLinksource(boolean linksource) {
        this.linksource = linksource;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public boolean isNodeprecated() {
        return nodeprecated;
    }

    public void setNodeprecated(boolean nodeprecated) {
        this.nodeprecated = nodeprecated;
    }

    public boolean isNosince() {
        return nosince;
    }

    public void setNosince(boolean nosince) {
        this.nosince = nosince;
    }

    public boolean isNotree() {
        return notree;
    }

    public void setNotree(boolean notree) {
        this.notree = notree;
    }

    public boolean isNoindex() {
        return noindex;
    }

    public void setNoindex(boolean noindex) {
        this.noindex = noindex;
    }

    public boolean isNohelp() {
        return nohelp;
    }

    public void setNohelp(boolean nohelp) {
        this.nohelp = nohelp;
    }

    public boolean isNonavbar() {
        return nonavbar;
    }

    public void setNonavbar(boolean nonavbar) {
        this.nonavbar = nonavbar;
    }

    public String getHelpfile() {
        return helpfile;
    }

    public void setHelpfile(String helpfile) {
        this.helpfile = helpfile;
    }

    public String getStylesheetfile() {
        return stylesheetfile;
    }

    public void setStylesheetfile(String stylesheetfile) {
        this.stylesheetfile = stylesheetfile;
    }

    public boolean isSerialwarn() {
        return serialwarn;
    }

    public void setSerialwarn(boolean serialwarn) {
        this.serialwarn = serialwarn;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public String getDocencoding() {
        return docencoding;
    }

    public void setDocencoding(String docencoding) {
        this.docencoding = docencoding;
    }

    public List<String> getTag() {
        return tag;
    }

    public void setTag(List<String> tag) {
        this.tag = tag;
    }

    public String getTaglet() {
        return taglet;
    }

    public void setTaglet(String taglet) {
        this.taglet = taglet;
    }

    public String getTagletpath() {
        return tagletpath;
    }

    public void setTagletpath(String tagletpath) {
        this.tagletpath = tagletpath;
    }

    public boolean isDocfilessubdirs() {
        return docfilessubdirs;
    }

    public void setDocfilessubdirs(boolean docfilessubdirs) {
        this.docfilessubdirs = docfilessubdirs;
    }

    public String getExcludedocfilessubdir() {
        return excludedocfilessubdir;
    }

    public void setExcludedocfilessubdir(String excludedocfilessubdir) {
        this.excludedocfilessubdir = excludedocfilessubdir;
    }

    public String getNoqualifier() {
        return noqualifier;
    }

    public void setNoqualifier(String noqualifier) {
        this.noqualifier = noqualifier;
    }

    public boolean isNotimestamp() {
        return notimestamp;
    }

    public void setNotimestamp(boolean notimestamp) {
        this.notimestamp = notimestamp;
    }

    public boolean isNocomment() {
        return nocomment;
    }

    public void setNocomment(boolean nocomment) {
        this.nocomment = nocomment;
    }
    
    public String getParser() {
        return parser;
    }

    public void setParser(String parser) {
        this.parser = parser;
    }

    public String getOutputter() {
        return outputter;
    }

    public void setOutputter(String outputter) {
        this.outputter = outputter;
    }

    public String getLogger() {
        return logger;
    }

    public void setLogger(String logger) {
        this.logger = logger;
    }
    
    //helper methods

    public String[][] buildOptionArray() {
        //TODO: this
        throw new UnsupportedOperationException();
    }
}
